﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SlamDunk.CMS.Model
{
    /// <summary>
    /// User实体类（手写部分）
    /// </summary>
    public partial class User
    {
        #region 01.方法——转换为视图模型对象
        /// <summary>
        /// 转换为视图模型对象方法
        /// </summary>
        /// <returns>视图模型对象</returns>
        public Model.UserViewForManage ToViewModel()
        {
            return new Model.UserViewForManage()
            {
                Id = this.Id,
                UserName = this.UserName,
                Password = this.Password,
                RealName = this.RealName,
                PhoneNumber = this.PhoneNumber,
                Email = this.Email,
                AddTime = this.AddTime.ToString("yyyy-MM-dd HH:mm:ss")
            };
        }
        #endregion
    }
}
